// 按租户应用获取续订/退订情况请求体
export type AppSubAnalysisByTenantReqDto = {
  tenantCode: string;
  appId: string;
  stepType: number;
  startTime: string;
  endTime: string;
};

// 按租户应用获取续订/退订情况 响应Map定义
export type AppSubAnalysisByTenantMap = {
  date: string;
  duration: number;
};

// 获取应用续订/退订比例请求体
export type AppSubProportionReq = {
  appId: string;
};

// 获取应用续订/退订比例响应
export interface AppSubProportionResp {
  appSubTenantNum: number[];
  // appUnSubTenantNum: number[];
  appUnsubTenantNum: number[];
  subProportion: number;
  unSubProportion: number;
}

// 获取应用续订/退订数（汇总）请求体
export type AppSubAnalysisInTotalReq = {
  appId: string;
  stepType: number;
  startTime: string;
  endTime: string;
};

// 应用续订/退订数 响应Map定义
export type AppSubNumMap = {
  date: string;
  number: number;
};

// 应用续订/退订（汇总）情况响应
export interface AppSubAnalysisInTotalResp {
  appSubTenantNum: AppSubNumMap[];
  appUnSubTenantNum: AppSubNumMap[];
}

// 获取应用续订/退订率（汇总）请求体
export type AppSubRateReq = {
  statisticalIndicator: number;
  appId: string;
  stepType: number;
  startTime: string;
  endTime: string;
};

// 应用续订/退订率 响应Map定义
export type AppSubRateMap = {
  date: string;
  rate: number;
};
